
from typing import List  # 导入 List 类型
from dataclasses import dataclass,field

@dataclass
class CatalogBook:
    bookId: int
    shelfId: int = 100
    title: str = ""
    fileName: str = ""
    filePath: str = ""
    cover: str = ""
    status: str = "0"
    delFlag: str = ""
    fileId: str = ""
    bookType: str = "0"
    pageCount: str = "0"
    createBy:str = ""
    createTime:str = ""
    updateBy:str = ""
    updateTime:str = ""
    remark:str = ""
    png_path:str = ""
    webp_path:str = ""
    page_file: List[str] = field(default_factory=list)

    def __str__(self):
        attributes = vars(self)
        attributes_str = ", ".join([f"{key}={value}" for key, value in attributes.items()])
        return f"CatalogBook({attributes_str})"